﻿using MaterialDesignThemes.Wpf;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace MyMeeting.Common
{
    public class VideoIconBoolConverter : IValueConverter
    {
        object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var isOpenVideo = Convert.ToBoolean(value);
            if (isOpenVideo)
            {
                return PackIconKind.Camera;
            }
            else
            {
                return PackIconKind.CameraOff;
            }
        }

        object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

    public class AudioIconBoolConverter : IValueConverter
    {
        object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var isOpenAudio = Convert.ToBoolean(value);
            if (isOpenAudio)
            {
                return PackIconKind.VoiceChat;
            }
            else
            {
                return PackIconKind.AccountTieVoiceOff;
            }
        }

        object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
